import { GlobalEvent } from "../base/GlobalEvent";
import { ConstData } from "../base/ConstData";
const {ccclass, property} = cc._decorator;

@ccclass
export default class backSceneBtn extends cc.Component {

    @property(cc.Label)
    sceneNameLabel: cc.Label = null;

    onLoad(){
        GlobalEvent.on(GlobalEvent.Event.loadingSceneComplete, function(Event){
            this.updateName(Event.PreSceneName);
        }.bind(this), this)
    }

    updateName(preSceneName){
        this.sceneNameLabel.string = "返回场景" + preSceneName;
    }
}
